#include<bits/stdc++.h>
using namespace std;
struct Person {
    char name[20];
    int count;
}leaders[3] = {"Li", 0, "Zhang", 0, "Fun", 0};

int main() {
	int n;cin>>n;
	for(int i=0;i<n;i++){
		char name[100];
		cin>>name;
		if(strcmp(name,"Li")==0)++leaders[0].count;
		if(strcmp(name,"Zhang")==0)++leaders[1].count;
		if(strcmp(name,"Fun")==0)++leaders[2].count;
	}
	for(int i=0;i<3;i++){
		cout<<leader[i].name<<":"<<leaders[i].count<<endl;
	}
}
